import re

str1 = '\巴拉<1"!11【】>1*hgn/p:?|'  # 样例

a = re.findall(r'[^\*"/:?\\|<>]', str1, re.S)

b = re.sub(r'[^\*"/:?\\|<>]', "", str1)
# a = "".join(a)
print(b)
